home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 11
/
FM Towns Free Software Collection 11.iso
/
t_os
/
game
/
cdr_100
/
cdr_map.bas
< prev
next >
Wrap
BASIC Source File
|
1995-05-21
|
6KB
|
153 lines
10 '★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
20 '
30 ' << CAR DOG R >> - コースマップ作成 -
40 '
50 '----------------------------------------------------------------
60 ' Game design Hiroto Kimura
70 ' Programed by KAMA
80 '★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
90 '
100 *初期設定:'------------------------------------------------------
110 DEFINT A-Z:SCREEN@ 1:CLS
120 WINDOW(0,0)-(511,255):VIEW(0,0)-(511,255)
130 DIM ROAD(4095),FOREST(4095),X(99),Y(99),MAPDATA(81919)
140 *パターン作成:'--------------------------------------------------
150 FOR I=0 TO 63
160 FOR J=0 TO 63
170 A=INT(RND*16+56)
180 PSET(I,J),[A,A,A]
190 NEXT J
200 NEXT I
210 GET@A(0,0)-(63,63),ROAD%
220 CLS
230 FOR I=0 TO 63
240 FOR J=0 TO 63
250 A=INT(RND*128+64)
260 PSET(I,J),[A,64,32]
270 NEXT J
280 NEXT I
290 GET@A(0,0)-(63,63),FOREST%
300 *コース作成:'----------------------------------------------------
310 '---1面 ---
320 CLS:GOSUB *森で塗りつぶし
330 PSZ=32:A=160:B=160:C=200:RESTORE *1面:GOSUB *路肩描く
340 PSZ=26:A=100:B=100:C=120:RESTORE *1面:GOSUB *路肩描く
350 PSZ=20:RESTORE *1面:GOSUB *道路描く
360 GET@A(0,0)-(319,255),MAPDATA
370 GOSUB *道路で塗りつぶし
380 PUT@A(0,0)-(319,255),MAPDATA,MATTE,,,0
390 X1=175:Y1=211:X2=175:Y2=236:GOSUB *スタートライン描く
400 SAVE@ "cdr_map1.tif",(0,0)-(319,255),,1
410 '--- 2面 ---
420 CLS:GOSUB *森で塗りつぶし
430 PSZ=32:A=160:B=160:C=200:RESTORE *2面:GOSUB *路肩描く
440 PSZ=26:A=100:B=100:C=120:RESTORE *2面:GOSUB *路肩描く
450 PSZ=20:RESTORE *2面:GOSUB *道路描く
460 GET@A(0,0)-(319,255),MAPDATA
470 GOSUB *道路で塗りつぶし
480 PUT@A(0,0)-(319,255),MAPDATA,MATTE,,,0
490 X1=175:Y1=211:X2=175:Y2=236:GOSUB *スタートライン描く
500 SAVE@ "cdr_map2.tif",(0,0)-(319,255),,1
510 '--- 3面 ---
520 CLS:GOSUB *森で塗りつぶし
530 PSZ=32:A=160:B=160:C=200:RESTORE *3面:GOSUB *路肩描く
540 PSZ=26:A=100:B=100:C=120:RESTORE *3面:GOSUB *路肩描く
550 PSZ=20:RESTORE *3面:GOSUB *道路描く
560 GET@A(0,0)-(319,255),MAPDATA
570 GOSUB *道路で塗りつぶし
580 PUT@A(0,0)-(319,255),MAPDATA,MATTE,,,0
590 X1=175:Y1=211:X2=175:Y2=236:GOSUB *スタートライン描く
600 SAVE@ "cdr_map3.tif",(0,0)-(319,255),,1
610 '--- 4面 ---
620 CLS:GOSUB *森で塗りつぶし
630 PSZ=32:A=160:B=160:C=200:RESTORE *4面:GOSUB *路肩描く
640 PSZ=26:A=100:B=100:C=120:RESTORE *4面:GOSUB *路肩描く
650 PSZ=20:RESTORE *4面:GOSUB *道路描く
660 GET@A(0,0)-(319,255),MAPDATA
670 GOSUB *道路で塗りつぶし
680 PUT@A(0,0)-(319,255),MAPDATA,MATTE,,,0
690 X1=175:Y1=211:X2=175:Y2=236:GOSUB *スタートライン描く
700 SAVE@ "cdr_map4.tif",(0,0)-(319,255),,1
710 '--- プログラム終了 ---
720 END
730 サブルーチン:'--------------------------------------------------
740 *森で塗りつぶし
750 FOR I=0 TO 4
760 FOR J=0 TO 3
770 PUT@A(I*64,J*64)-(I*64+63,J*64+63),FOREST%
780 NEXT J
790 NEXT I
800 RETURN
810 *道路で塗りつぶし
820 FOR I=0 TO 4
830 FOR J=0 TO 3
840 PUT@A(I*64,J*64)-(I*64+63,J*64+63),ROAD%
850 NEXT J
860 NEXT I
870 RETURN
880 *道路描く
890 READ DNUM
900 FOR I=0 TO DNUM-1
910 READ X(I),Y(I)
920 NEXT
930 POINT(X(0),Y(0)):DEF PEN 0,PSZ
940 FOR I=1 TO DNUM-1
950 LINE-(X(I),Y(I)),PSET,0
960 NEXT
970 RETURN
980 *路肩描く
990 READ DNUM
1000 FOR I=0 TO DNUM-1
1010 READ X(I),Y(I)
1020 NEXT
1030 POINT(X(0),Y(0)):DEF PEN 0,PSZ
1040 FOR I=1 TO DNUM-1
1050 LINE-(X(I),Y(I)),PSET,[A,B,C]
1060 NEXT
1070 RETURN
1080 *スタートライン描く
1090 DEF PEN 0,1:LINE(X1,Y1)-(X2,Y2),PSET,7
1100 RETURN
1110 '★☆★ コースデータ ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
1120 ' x, y, x, y, x, y, x, y
1130 *1面:'----------------------------------------------------------
1140 DATA 29 :'この行の下に何個のデ-タがあるか
1150 DATA 175,223, 51,223, 38,220, 31,210:'4
1160 DATA 31,200, 38,190, 51,187, 85,187:'8
1170 DATA 105, 40,108, 38,132, 38,135, 40:'12
1180 DATA 135,160,160,160,162,140,167,120:'16
1190 DATA 180, 80,200, 30,220, 25,250, 30:'20
1200 DATA 282, 35,285, 50,287,140,287,160:'24
1210 DATA 290,180,292,200,289,214,283,223:'28
1220 DATA 175,223
1230 *2面:'----------------------------------------------------------
1240 DATA 29 :'この行の下に何個のデ-タがあるか
1250 DATA 175,223, 40,223, 30,160, 30,120:'4
1260 DATA 65, 50,100, 30,150, 30,160, 35:'8
1270 DATA 180, 90,210, 90,230, 35,240, 30:'12
1280 DATA 280, 30,286, 60,290,100,286,140:'16
1290 DATA 270,150,140,155,135,130,122,125:'20
1300 DATA 110,130,105,150,105,160,120,185:'24
1310 DATA 280,190,290,200,290,210,280,223:'28
1320 DATA 175,223
1330 *3面:'----------------------------------------------------------
1340 DATA 31 :'この行の下に何個のデ-タがあるか
1350 DATA 175,223, 54,223, 41,214, 37,196:'4
1360 DATA 39,169, 50,157, 62,156, 72,167:'8
1370 DATA 79,176, 95,174,137,108,137, 98:'12
1380 DATA 105, 49,111, 37,121, 33,136, 35:'16
1390 DATA 269, 41,283, 50,282, 61,271, 67:'20
1400 DATA 212, 69,200, 74,168,130,167,134:'24
1410 DATA 178,147,259,174,272,180,278,199:'28
1420 DATA 273,214,263,223,175,223
1430 *4面:'----------------------------------------------------------
1440 DATA 28
1450 DATA 175,223, 60,223, 50,200, 80,167:'4
1460 DATA 30, 80, 30, 70, 35, 50, 80, 35:'8
1470 DATA 120, 40,100,130,150,100,150,180:'12
1480 DATA 160,185,180,180,210,130,210,120:'16
1490 DATA 170, 40,173, 35,190, 25,230, 40:'20
1500 DATA 250, 60,275,100,280,130,282,145:'24
1510 DATA 280,160,260,210,240,223 :'27
1520 DATA 175,223